﻿@model IEnumerable<Fcom.VNInsurance.Web.Models.CPInfo>
@{
    ViewBag.Title = "CompareLives";
    Layout = "~/Views/Shared/_0311layout.cshtml";
    var LangProduct = (Fcom.VNInsurance.Web.Models.ProductLang)ViewBag.LangProduct;
    var CurrentLang = (Fcom.VNInsurance.Web.Models.Language)ViewBag.CurrentLang;
    var LangCat = (Fcom.VNInsurance.Web.Models.ProductCatLang)ViewBag.LangCat;
    var productFAQ = (IEnumerable<Fcom.VNInsurance.Web.Models.ProductFAQ>)ViewBag.productFAQ;

}

<div class="container">
     <ul class="breadcrumb" style="margin-bottom:0px !important">
                      <li><a href="@Url.Action("Index","Home")">@Fcom.VNInsurance.Web.LangResource.Layout.lblHome</a></li>
                      <li><a href="@Url.Action("ProductCat", "Product", new {pCat=@LangCat.CatID})">@LangCat.DisplayName</a></li>
                      <li class="active">@LangProduct.DisplayName</li>
      </ul>
    <div style="clear:both"></div>
    <div class="top_slider container" id="afocus">
             <div class="col-lg-6" style="padding-top:10px;font-weight:bold;">
             @Fcom.VNInsurance.Web.LangResource.ContactLayout.lblComapreMaket
             </div>
			<div class="col-lg-6">
                <ol class="top_bar">
                <li><a class="active" id="show_div"><span style="font-weight:bold;">@Fcom.VNInsurance.Web.LangResource.Layout.lblYourInfo</span></a> </li>
                <li><a class="bar_2"><span>@Fcom.VNInsurance.Web.LangResource.Layout.lblCompareText</span></a></li>
                <li><a class="bar_3"><span>@Fcom.VNInsurance.Web.LangResource.Layout.lblPolicy</span></a></li>
                <li style="width: 70px !important;"><a class="bar_4"><span>@Fcom.VNInsurance.Web.LangResource.Layout.lblPayment</span></a></li>
            </ol>
            
			</div>
           
        </div>
     <div style="clear:both"></div>
</div>


<div class="container" style="margin-top:10px">
    
    <table class="table table-bordered table-hover">
        <thead>
          <tr>
            <th style="text-align:center">@Fcom.VNInsurance.Web.LangResource.Layout.lblCompany</th>
            <th>@Fcom.VNInsurance.Web.LangResource.Layout.lblBenefit</th>
            <th>Số tiền Bảo hiểm (@CurrentLang.MoneyUnit)</th>
            <th style="text-align:center">@Fcom.VNInsurance.Web.LangResource.Layout.lblFarePerson<br />(@CurrentLang.MoneyUnit)</th>
            <th style="text-align:center">@Fcom.VNInsurance.Web.LangResource.Layout.lblJoin</th>
          </tr>
        </thead>
        <tbody>
         @if (Model.Count() > 0)
         { 
             foreach(var cp in Model)
             {
              <tr class="row">
                <td style="text-align:center">
                    <img alt="VNBaoHiem"  src="@Url.Content("~/Content/images/CompanyLogo/"+cp.CompanyLogo)" class="img-responsive" width="100px" /><br />
                    <b>@cp.CompanyName</b>
                    <br />
                    <a class="btnviewmore" style="font-size:11px" href="#">@Fcom.VNInsurance.Web.LangResource.Layout.lblMoreinfo</a>
                </td>
                <td>@Html.Raw(HttpUtility.HtmlDecode(cp.Benefit))</td>
                <td>@String.Format("{0:#,###}", cp.InsuranceMoney)</td>
                <td style="text-align:center">@String.Format("{0:#,###}", cp.Fare)</td>
                <td style="text-align:center"><a href="#" class="btn btn-lg btn-success">Tham gia</a>
                    
                </td>
              </tr>
             <tr class="hiddentr nexttr">
                <td colspan="6">@Html.Raw(HttpUtility.HtmlDecode(cp.MoreInfo))</td>
             </tr> 
            }
         }
            else
            {
            <tr>
            <td colspan="5">Updating...</td>
          </tr> 
         }
        </tbody>
      </table>
</div>
 <div class="accleft">
              
    <div class="accordion" id="accordion2">
            @foreach(var fq in productFAQ)
            { 
                                    <h3><img src="@Url.Content("~/Content/images/arrow_accord.gif")" alt="vnbaohiem"/> @fq.Question</h3>
                <div>

                    @Html.Raw(HttpUtility.HtmlDecode(fq.Answer))
                </div>
                                                       
                       
           
            }
    </div>
        
    </div>
    <div class="accright">   
        @Html.Raw(HttpUtility.HtmlDecode(LangProduct.DisplayIntro))
        </div>
<script type="text/javascript">
    $("a.btnviewmore").click(function () {
        var viewmore = $(this).parent().parent().next();
        if (viewmore.attr("rel") == "") {
            viewmore.attr("rel", "1");
            $(this).text("@Fcom.VNInsurance.Web.LangResource.Layout.lblToSmall");
            viewmore.removeClass("hiddentr");
        }
        else {
            viewmore.attr("rel", "");
            viewmore.addClass("hiddentr");
            $(this).html("@Fcom.VNInsurance.Web.LangResource.Layout.lblMoreinfo");
        }
        return false;
    });
</script>
